﻿using System.Linq;
using System.Collections.Generic;
using System;
using Newtonsoft.Json;

namespace Test
{
    class Program
    {
        static void Main(string[] args)
        {
            Dictionary<int, List<string>> dic = new Dictionary<int, List<string>>();
            dic.Add(9, new List<string>() { "linkman", "telephone", });
            dic.Add(6, new List<string>() { "name", "address", });
            dic.Add(5, new List<string>() { "schoolNature", "hzyType", "subGardenCount", "grade", });
            dic.Add(3, new List<string>() { "classCount","childCount","teacherCount","careClassCount","careStudentCount",
            "smallClassCount","smallStudentCount","midClassCount","midStudentCount","bigClassCount","bigStudentCount",
            "preClassCount", "preStudentCount","byxkz,yzsfz,yyzz,mpzp" });
            dic.Add(2, new List<string>() { "provinceId", "cityId", "areaId", "birthday", });
            int sum = 0;

            Dictionary<string, int> dics = new Dictionary<string, int>();
            foreach (var item in dic.Keys)
            {
                foreach (var it in dic[item])
                {
                    dics.Add(it, item);
                }
            }
            sum = dics.Values.Sum();
            string str = JsonConvert.SerializeObject(dics);
            Console.WriteLine($"总分:{sum}");
            Console.WriteLine(str);
        }
    }
}
